fix(ssr): keep compiled framework cache graphs reusable - #3118
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes SSR transform cache reusability for compiled framework modules whose physical paths end in .ts.src / .tsx.src, preventing unnecessary re-transforms and elevated error/latency under concurrent preview SSR.
Changes:
- Preserve and validate compiled
.srcfile URLs during cached-code path extraction, including stripping query/hash safely. - Normalize dependency graph paths so
.srcmodules hash their physical embedded dependency graph (without rewriting to.js). - Generate content-addressed temporary
.jsartifacts for terminal.ts.src/.tsx.srcinputs, with new regression tests.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/version-constant.ts | Bumps framework version constant to 0.1.1154. |
| deno.json | Bumps package version to 0.1.1154. |
| src/modules/react-loader/ssr-module-loader/tmp-paths.ts | Updates temp module path rewriting to support terminal `.(ts |
| src/modules/react-loader/ssr-module-loader/tmp-paths.test.ts | Adds regression test for hashed temp paths from compiled framework .src files. |
| src/modules/react-loader/ssr-module-loader/ssr-cache-manager.test.ts | Adds validation regression test for cache entries referencing compiled framework .src sources. |
| src/modules/react-loader/ssr-module-loader/http-bundle-helpers.ts | Broadens file:// extraction then filters supported extensions, preserving .src and stripping ?/#. |
| src/modules/react-loader/ssr-module-loader/http-bundle-helpers.test.ts | Adds tests for .src preservation and avoiding unsupported suffix truncation. |
| src/cache/dependency-graph.ts | Normalizes dependency paths to preserve .src physical graph when the importing file is .src. |
| src/cache/dependency-tracking.test.ts | Adds regression ensuring dependency hashing changes when compiled .src dependencies change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Compiled Deno binaries embed framework sources as *.ts.src and *.tsx.src. Cache validation truncated those URLs, dependency hashing probed rewritten .js paths, and SSR temp paths ignored content hashes for embedded sources. Preserve the physical source identity during graph hashing and validation, reject host-bearing file URLs, then emit content-addressed JavaScript cache artifacts. Constraint: Compiled framework sources retain their authored extension before the .src suffix. Rejected: Raise SSR deadlines or skip local-path validation | either would hide repeated invalidation without repairing the cache graph. Confidence: high Scope-risk: narrow Directive: Keep embedded .src recognition aligned across dependency hashing, cache validation, and temp-path generation. Tested: deno task verify:quick; 81 focused cache/dependency steps; fresh compiled-binary E2E (62/62); source-built app cold concurrency (20/20 review and 20/20 chat HTTP 200); framework suite 3113 passed with 2 unrelated baseline packaging failures. Not-tested: Authenticated staging concurrency until v0.1.1154 is released and deployed.
kojiwakayama
force-pushed
the
fix/portable-framework-cache-paths
branch
from
July 26, 2026 05:32
84efd76 to
4106e5a
Compare
kojiwakayama
enabled auto-merge
July 26, 2026 05:39
Copilot stopped reviewing on behalf of
kojiwakayama due to an error
July 26, 2026 05:58
kwakayama
approved these changes
Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Compiled framework modules use physical paths ending in .ts.src or .tsx.src. Three cache-path mismatches made valid entries look stale during concurrent preview SSR:
The result was repeated context/router re-transforms, invalid-local-path warnings, and elevated 500/503 latency under cold concurrency.
Fix
This deliberately does not increase timeouts or bypass cache validation.
Verification
Release
Bumps framework version to 0.1.1154.